<?php
/**
 * Created by PhpStorm.
 * User: lelouchms
 * Date: 2019/3/28
 * Time: 15:54
 */

namespace app\backend\controller;


use app\backend\middleware\TransactionMiddleware;
use app\common\exception\CustomerException;
use think\facade\Config;
use think\Controller;

class BackendController extends Controller
{

    const SUCCESS = 200;

    public function initialize()
    {
        Config::set("default_return_type", "json");
        parent::initialize();
    }

    protected $middleware = [
        TransactionMiddleware::class
    ];



    /**
     * 拒绝请求的操作
     * @var array
     */
    protected $denyActions = [];

    protected $allow_action = [];

    protected $allow_controller = [];

    public function _empty()
    {
        throw new CustomerException("无效的地址");
    }
}